package com.lzy.cloud.order.constants;

/**
 * @Description: 订单动作
 * @Author:   gyl
 * @Date:     2018/7/10 15:32
 */
public class OrderActionConstants {
	// [{"value":"取消","key":"cancel"},{"value":"去付款","key":"pay"}]
	public static final String CANCLE = "{" + "\"v\":\"取消\",\"k\":\"cancle\"}";
	public static final String PAY = "{" + "\"v\":\"去付款\",\"k\":\"pay\"}";
	public static final String SEND = "{" + "\"v\":\"发货\",\"k\":\"send\"}";
	public static final String CONFIRM = "{" + "\"v\":\"确认收货\",\"k\":\"confirm\"}";
	public static final String BACKMONEY = "{" + "\"v\":\"退款\",\"k\":\"backMoney\"}";
	public static final String VERIFY = "{" + "\"v\":\"平台审核\",\"k\":\"verify\"}";
	public static final String CONTACT = "{" + "\"v\":\"待联系\",\"k\":\"waitContact\"}";
	public static final String PICKCAR = "{" + "\"v\":\"提车\",\"k\":\"pickCar\"}";
	public static final String RETURNCAR = "{" + "\"v\":\"还车\",\"k\":\"returnCar\"}";
	public static final String RETREAT = "{" + "\"v\":\"退订\",\"k\":\"retreat\"}";
	public static final String APPEAL = "{" + "\"v\":\"申诉\",\"k\":\"appeal\"}";
	public static final String CHECKCODE = "{" + "\"v\":\"核销\",\"k\":\"checkCode\"}";
	public static final String CHECKSALE = "{" + "\"v\":\"售后\",\"k\":\"checkSale\"}";
	public static final String DATE_CONFIRM = "{" + "\"v\":\"确认\",\"k\":\"dateConfirm\"}";
	public static final String MANUAL_COMPLETE = "{" + "\"v\":\"手动完结\",\"k\":\"dateConfirm\"}";
	public static final String ONCE_AGAIN= "{" + "\"v\":\"再次购买\",\"k\":\"onceAgain\"}";

	public static String getStr(String... str) {
		StringBuilder sb = new StringBuilder("[");
		if (str == null || str.length == 0) {
			return sb.append("]").toString();
		}
		int len = str.length;
		for (int i = 0; i <= len - 1; i++) {
			if (i == len - 1) {
				sb.append(str[i]);
			} else {
				sb.append(str[i]).append(",");
			}
		}
		sb.append("]");
		return sb.toString();

	}

	public static void main(String[] args) {
		Long start = System.currentTimeMillis();
		try {
			System.out.println(getStr(OrderActionConstants.CANCLE, OrderActionConstants.PAY ));
		} catch (Exception e) {
			e.printStackTrace();
		}
		Long end = System.currentTimeMillis();
		System.out.println(end - start);
	}
}
